<template>
  <div>
    <div class="home-item-wrapper">
      <div class="home-item-panel" style="margin-bottom: 15px;">
        <HomeTodoCard
          cardMode="review"
          :cardItems="cardItems1"
          :cardItemStyle="{
            flex: 'none',
            width: 'calc(100% / 3)'
          }"
        />
      </div>
    </div>
  </div>
</template>

<script setup>
import HomeUtils from '../config/home-utils'
import HomeTodoCard from '../items/HomeTodoCard.vue'

const props = defineProps({
  loading: { type: Boolean, default: false },
  todoData: { type: [ Object, Array ] }
})

// 项目排序
const cardItems1= ref([])

watch(
  () => props.todoData,
  (newValue, oldValue) => {
    const { accItems } = HomeUtils.tranfLawAccData(newValue)
    cardItems1.value = accItems
  },
  {deep: false, immediate: false}
)


const cardItems = [
  {
    icon: 'report-upload',
    label: '财评报告上传',
    value: 12,
  }
]

</script>

<style lang="scss" scoped>
.home-item-wrapper {
  display: flex;
  margin-left: -8px;
  margin-right: -8px;
}
.home-item-panel {
  flex: 1;
  padding: 0 8px;
}
</style>